<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Centro de Custo</title>
</h:head>
<h:body>

	<ui:composition template="template.xhtml">

		<ui:define name="template_title">
       Inclusão de Centro de Custos
      </ui:define>

		<ui:define name="page_content">
			<h:form id="form">

				<p:panel id="panel" header="Novo Centro Custo"
					style="margin-bottom:10px;">
					<!-- <p:messages id="messages" /> -->
					<h:panelGrid columns="3">
						<h:outputLabel for="custoID" value="Centro de Custo: *" />
						<p:inputText id="custoID" value="#{custoBean.nomeCusto}"
							required="true" label="centro custo">
						</p:inputText>
						<p:message for="custoID" />
						
                        <h:outputLabel for="projetoListID" value="Informe os projetos: *" />
						<p:selectCheckboxMenu id="projetoListID" value="#{custoBean.idProjetoSelecionados}"
							label="Projetos" filter="true" filterText="Filter"
							filterMatchMode="startsWith" panelStyle="width:220px" required="true">
							<f:selectItems value="#{custoBean.valuesComboBoxProjeto}" />
						</p:selectCheckboxMenu>
                        <p:message for="projetoListID" />
						

					</h:panelGrid>
				</p:panel>

				<p:commandButton value="Enviar" update="panel" id="ajax"
					actionListener="#{custoBean.incluir}"
					styleClass="ui-priority-primary" />
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>

</html>